import query from '@dfeidao/atom-nodejs/db/query';
import { IncomingHttpHeaders } from 'http';
import {productid, systemid } from '../../atom/config';

interface Message {
	equip_depart: string;
}

export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders) {
	const q = query(action_id, session_id, systemid);
	q.prepare('company_project', ['project_no', 'project_name'], { productid, equip_depart_no: message.equip_depart }, 200, 1, [], []);
	const [dt] = await q.exec();
	return dt;
}
